import request from '@/utils/request';

export async function queryDictItemsByCodes(params) {
  return request(`/osApi/mdm/nmDict/queryDictItemsByCodes`, {
    method: 'POST',
    body: params,
  });
}
export async function fetchList(params) {
  return request(`/osApi/plcyInfo/pageList`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function deleteMany(params) {
  return request(`/osApi/plcyInfo/delete`, {
    method: 'POST',
    body: params,
  });
}

export async function switchRun(params) {
  return request(`/osApi/plcyInfo/updatePlcyState`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function cityChange(params) {
  return request(`/osApi/mdm/nmArea/queryNmArea`, {
    method: 'POST',
    body: params,
  });
}

export async function handleSubmit(params) {
  return request(`/osApi/plcyInfo/insert`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function getContent(params) {
  return request(`/osApi/plcyInfo/select`, {
    method: 'POST',
    body: params,
  });
}

export async function update(params) {
  return request(`/osApi/plcyInfo/update`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
